.class public Lcom/waiqin365/lightapp/im/adapter/ao;
.super Landroid/widget/BaseAdapter;


# instance fields
.field private a:Landroid/content/Context;

.field private b:Ljava/util/List;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/List;)V
    .locals 1

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/ao;->b:Ljava/util/List;

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/adapter/ao;->a:Landroid/content/Context;

    iput-object p2, p0, Lcom/waiqin365/lightapp/im/adapter/ao;->b:Ljava/util/List;

    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/ao;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/ao;->b:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2

    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 8

    const v7, 0x7f0c07cf

    const v6, 0x7f0c07ce

    const/16 v5, 0x8

    const/4 v4, 0x0

    if-nez p2, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/ao;->a:Landroid/content/Context;

    invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f03015b

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    new-instance v1, Lcom/waiqin365/lightapp/im/adapter/ap;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/im/adapter/ap;-><init>(Lcom/waiqin365/lightapp/im/adapter/ao;)V

    invoke-virtual {p2, v1}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    const v0, 0x7f0c07cb

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/RelativeLayout;

    invoke-static {v1, v0}, Lcom/waiqin365/lightapp/im/adapter/ap;->a(Lcom/waiqin365/lightapp/im/adapter/ap;Landroid/widget/RelativeLayout;)Landroid/widget/RelativeLayout;

    const v0, 0x7f0c07cc

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    invoke-static {v1, v0}, Lcom/waiqin365/lightapp/im/adapter/ap;->a(Lcom/waiqin365/lightapp/im/adapter/ap;Landroid/widget/TextView;)Landroid/widget/TextView;

    const v0, 0x7f0c07cd

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    invoke-static {v1, v0}, Lcom/waiqin365/lightapp/im/adapter/ap;->a(Lcom/waiqin365/lightapp/im/adapter/ap;Landroid/widget/ImageView;)Landroid/widget/ImageView;

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/ao;->b:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/im/domain/a;

    invoke-static {v1}, Lcom/waiqin365/lightapp/im/adapter/ap;->a(Lcom/waiqin365/lightapp/im/adapter/ap;)Landroid/widget/TextView;

    move-result-object v2

    iget-object v3, v0, Lcom/waiqin365/lightapp/im/domain/a;->a:Ljava/lang/String;

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget v0, v0, Lcom/waiqin365/lightapp/im/domain/a;->c:I

    const/4 v2, 0x1

    if-ne v0, v2, :cond_1

    invoke-static {v1}, Lcom/waiqin365/lightapp/im/adapter/ap;->b(Lcom/waiqin365/lightapp/im/adapter/ap;)Landroid/widget/ImageView;

    move-result-object v0

    invoke-virtual {v0, v4}, Landroid/widget/ImageView;->setVisibility(I)V

    :goto_1
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/ao;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    add-int/lit8 v0, v0, -0x1

    if-ne v0, p1, :cond_2

    invoke-virtual {p2, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, v4}, Landroid/view/View;->setVisibility(I)V

    invoke-virtual {p2, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, v5}, Landroid/view/View;->setVisibility(I)V

    :goto_2
    return-object p2

    :cond_0
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/im/adapter/ap;

    move-object v1, v0

    goto :goto_0

    :cond_1
    invoke-static {v1}, Lcom/waiqin365/lightapp/im/adapter/ap;->b(Lcom/waiqin365/lightapp/im/adapter/ap;)Landroid/widget/ImageView;

    move-result-object v0

    invoke-virtual {v0, v5}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_1

    :cond_2
    invoke-virtual {p2, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, v4}, Landroid/view/View;->setVisibility(I)V

    invoke-virtual {p2, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, v5}, Landroid/view/View;->setVisibility(I)V

    goto :goto_2
.end method
